package com.ruoyi.walmart.domain.order;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Order {
    private String purchaseOrderId;
    private String customerOrderId;
    private String customerEmailId;
    private String orderType;
    private long orderDate;
    private ShippingInfo shippingInfo;
    private OrderLines orderLines;
    private ShipNode shipNode;

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public class ShippingInfo {
        private String phone;
        private long estimatedDeliveryDate;
        private long estimatedShipDate;
        private String methodCode;
        private PostalAddress postalAddress;

        // getters and setters
    }
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public class PostalAddress {
        private String name;
        private String address1;
        private String address2;
        private String city;
        private String state;
        private String postalCode;
        private String country;
        private String addressType;

        // getters and setters
    }
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public class OrderLines {
        private List<OrderLine> orderLine;

        // getters and setters
    }
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public class OrderLine {
        private String lineNumber;
        private Item item;
        private Charges charges;
        private OrderLineQuantity orderLineQuantity;
        private long statusDate;
        private orderLineStatuses orderLineStatuses;
        private String originalCarrierMethod;
        private Fulfillment fulfillment;

        // getters and setters
    }
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public class Item {
        private String productName;
        private String sku;

        // getters and setters
    }
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public class Charges {
        private List<Charge> charge;

        // getters and setters
    }
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public class Charge {
        private String chargeType;
        private String chargeName;
        private ChargeAmount chargeAmount;
        private Tax tax;

        // getters and setters
    }
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public class ChargeAmount {
        private String currency;
        private double amount;

        // getters and setters
    }
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public class Tax {
        private String taxName;
        private ChargeAmount taxAmount;

        // getters and setters
    }
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public class OrderLineQuantity {
        private String unitOfMeasurement;
        private String amount;

        // getters and setters
    }
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public class orderLineStatuses {
        private List<OrderLineStatus> orderLineStatus;

        // getters and setters
    }
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public class OrderLineStatus {
        private String status;
        private String subSellerId;
        private StatusQuantity statusQuantity;
        private String cancellationReason;
        private TrackingInfo trackingInfo;
        private String returnCenterAddress;

        // Getters and setters
    }
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public class StatusQuantity {
        private String unitOfMeasurement;
        private String amount;

        // Getters and setters
    }
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public class CarrierName {
        private String otherCarrier;
        private String carrier;

        // Getters and setters
    }
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public class TrackingInfo {
        private long shipDateTime;
        private CarrierName carrierName;
        private String methodCode;
        private int carrierMethodCode;
        private String trackingNumber;
        private String trackingURL;

        // Getters and setters
    }
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public class Fulfillment {
        private String fulfillmentOption;
        private String shipMethod;
        private long pickUpDateTime;
        private String shippingProgramType;

        // getters and setters
    }
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public class ShipNode {
        private String type;

        // getters and setters
    }

    // getters and setters
}




